import {Effect} from "../../IEffectContainer";
import {logUtil} from "../../../util/logUtil";

export class test extends Effect {

    apply(target: any) {
        logUtil.instance.log("test002","通用测试开始")
        this.timerId = setTimeout(() => {
            this.remove(target)
            logUtil.instance.log("test002","通用测试结束")
        }, this.duration[this.level-1]+1000)
    }

    remove(target: any) {
        logUtil.instance.log("test002","通用测试终止")
        // 清除定时器，打断动作1
        clearTimeout(this.timerId);
        // 重置定时器ID
        this.timerId = null;
    }
}
